projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7f9d56
)
bookmarklist: Avoid an invalid read
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 27 Mar 2021 20:48:30 +0000
(16:48 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 27 Mar 2021 23:11:56 +0000
(19:11 -0400)
This shows up when running the objects-finalize
test under valgrind.
gtk/gtkbookmarklist.c
patch
|
blob
|
history
diff --git
a/gtk/gtkbookmarklist.c
b/gtk/gtkbookmarklist.c
index 6afe1b46f4423ea76480a1722093f20067a0efbf..6df9d5fa86e06f930d9dea77db7c6f7e47df2948 100644
(file)
--- a/
gtk/gtkbookmarklist.c
+++ b/
gtk/gtkbookmarklist.c
@@
-287,8
+287,15
@@
got_file_info (GObject *source,
GtkBookmarkList *self = user_data;
GFile *file = G_FILE (source);
GFileInfo *info;
+ GError *error = NULL;
+
+ info = g_file_query_info_finish (file, res, &error);
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ {
+ g_error_free (error);
+ return;
+ }
- info = g_file_query_info_finish (file, res, NULL);
if (info)
{
char *uri;